package com.hsmw.schedule.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hsmw.common.base.BaseMapper;
import com.hsmw.domain.HsmwItem;
import com.hsmw.schedule.vo.ConcreteItemCountVO;
import com.hsmw.schedule.vo.HomeVolume;
import com.hsmw.schedule.vo.ItemDetailInfoVO;
import com.hsmw.schedule.vo.ItemDetailVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;

@Repository
public interface HsmwItemMapper extends BaseMapper<HsmwItem> {
    ItemDetailInfoVO getItemDetail(String itemId);

    IPage<HsmwItem> selectPagelist(IPage page, @Param("hsmwItem") HsmwItem hsmwItem);

    List<HomeVolume> findItemVolumeOnWeek();

    List<HomeVolume> findItemVolumeOnMonth();

    List<HomeVolume> findItemVolumeOnYear();

    int checkIfHasOrder(HashMap param);

    IPage<HsmwItem> selectItemInfoList(IPage page,  @Param("hsmwItem") HsmwItem hsmwItem );


    IPage<HsmwItem> selectItemListByForemanId(IPage page,  @Param("userId") String userId);


    void removeItemInfoById(String itemId);

    ItemDetailVO getItemDetailById(HashMap param);

    List<ConcreteItemCountVO> selectItemMonthCount(HashMap param);

    List<ConcreteItemCountVO> selectItemDayCount(HashMap param);

    List<HsmwItem> checkItemIfExists(String itemId);

    double sumDriverVolumeByItemId(String id);
}
